package com.copa.gameStore.client;

import com.copa.gameStore.domain.GameGoods;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @author copa
 * @createDate 2022-10-23 21:01
 * @function
 */
@FeignClient("game-goods")
public interface GameGoodsClient {

    @GetMapping("validateGoods/{gameGoodsId}")
    Boolean validateGoods(@PathVariable("gameGoodsId") Long gameGoodsId);

    @GetMapping("getById/{gameGoodsId}")
    GameGoods getById(@PathVariable("gameGoodsId") Long gameGoodsId);

    @GetMapping("stock")
    void stock(@RequestParam("gameGoodsId") Long gameGoodsId,
               @RequestParam("num") Integer num);
}
